/*
 * Copyright (C) 2017 Peng fei Pan <sky@panpf.me>
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package me.panpf.adapter.more;

import androidx.annotation.IdRes;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;

import me.panpf.adapter.ItemFactory;
import me.panpf.adapter.OnClickListener;
import me.panpf.adapter.OnLongClickListener;

public interface MoreItemFactory<DATA> extends ItemFactory<DATA> {

    @NonNull
    @Override
    MoreItemFactory<DATA> setSpanSize(int spanSize);

    @NonNull
    @Override
    MoreItemFactory<DATA> fullSpan(@NonNull RecyclerView recyclerView);

    @Override
    MoreItemFactory<DATA> setInRecycler(boolean inRecycler);

    @Override
    MoreItemFactory<DATA> setOnViewClickListener(@IdRes int viewId, @NonNull OnClickListener<DATA> onClickListener);

    @Override
    MoreItemFactory<DATA> setOnItemClickListener(@NonNull OnClickListener<DATA> onClickListener);

    @Override
    MoreItemFactory<DATA> setOnViewLongClickListener(@IdRes int viewId, @NonNull OnLongClickListener<DATA> onClickListener);

    @Override
    MoreItemFactory<DATA> setOnItemLongClickListener(@NonNull OnLongClickListener<DATA> onClickListener);

    void loadMoreFinished(boolean end);

    void loadMoreFailed();
}
